// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/libs/request';

/**
 * @description 文章管理--列表
 * @param {Object} param data {Object} 传值参数
 */
export function cmsListApi(data) {
  return request({
    url: 'question/store',
    method: 'get',
    params: data,
  });
}

/**
 * @description 文章管理--新增编辑
 * @param {Object} param data {Object} 传值参数
 */
export function cmsAddApi(data) {
  return request({
    url: 'question/store',
    method: 'post',
    data,
  });
}

/**
 * @description 文章管理--文章详情
 * @param {Number} param id {Number} 文章id
 */
export function createApi(id) {
  return request({
    url: `question/store/${id}`,
    method: 'get',
  });
}
/**
 * @description 问题管理 -- 导出
 */
export function questionExpirtApi(type) {
  return request({
    url: `export/question/`+type,
    method: 'get',
    params: {},
  });
}

/**
 * @description 管理--列表
 * @param {Object} param data {Object} 传值参数
 */
export function dataListApi(data) {
  return request({
    url: 'question/list',
    method: 'get',
    params: data,
  });
}